package beans;

import java.sql.Timestamp;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "goods")
public class Goods {
	private int id;// 物品ID
	private Terminal terminal;// 设备外键
	private int boxNum;// 物品箱格
	private String orderNo;// 物品订单号
	private Timestamp storeTime;// 物品存入时间
	private String userMobileNum;// 用户手机号码
	private String mobileNum;// 投递员手机号码
	private Timestamp getTime;// 取物时间
	private String openCode;// 开箱码
	private String status;// 状态
	private String comment;// 备注
	private String getCode;// 取物码
	private Agent agent;// 代理商外键
	private Timestamp bookingTime;// 预定时间
	private Timestamp deadTime;// 超时时间
	private String remark;// 下发标记 0预定待下发1预定已下发2取消预定待下发3取消预定已下发6反置位待下发7反置位已下发
	private String isForcedOpen;// 是否强制开箱

	@GenericGenerator(name = "generator", strategy = "native")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "goods_id", unique = true, nullable = false)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "goods_terminalID")
	public Terminal getTerminal() {
		return terminal;
	}

	public void setTerminal(Terminal terminal) {
		this.terminal = terminal;
	}

	@Column(name = "goods_boxNum")
	public int getBoxNum() {
		return boxNum;
	}

	public void setBoxNum(int boxNum) {
		this.boxNum = boxNum;
	}

	@Column(name = "goods_orderNo")
	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	@Column(name = "goods_storeTime")
	public Timestamp getStoreTime() {
		return storeTime;
	}

	public void setStoreTime(Timestamp storeTime) {
		this.storeTime = storeTime;
	}

	@Column(name = "goods_userMobileNum")
	public String getUserMobileNum() {
		return userMobileNum;
	}

	public void setUserMobileNum(String userMobileNum) {
		this.userMobileNum = userMobileNum;
	}

	@Column(name = "goods_mobileNum")
	public String getMobileNum() {
		return mobileNum;
	}

	public void setMobileNum(String mobileNum) {
		this.mobileNum = mobileNum;
	}

	@Column(name = "goods_getTime")
	public Timestamp getGetTime() {
		return getTime;
	}

	public void setGetTime(Timestamp getTime) {
		this.getTime = getTime;
	}

	@Column(name = "goods_openCode")
	public String getOpenCode() {
		return openCode;
	}

	public void setOpenCode(String openCode) {
		this.openCode = openCode;
	}

	@Column(name = "goods_status")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "goods_comment")
	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	@Column(name = "goods_getCode")
	public String getGetCode() {
		return getCode;
	}

	public void setGetCode(String getCode) {
		this.getCode = getCode;
	}

	@ManyToOne
	@JoinColumn(name = "goods_agent_id")
	public Agent getAgent() {
		return agent;
	}

	public void setAgent(Agent agent) {
		this.agent = agent;
	}

	@Column(name = "goods_bookingTime")
	public Timestamp getBookingTime() {
		return bookingTime;
	}

	public void setBookingTime(Timestamp bookingTime) {
		this.bookingTime = bookingTime;
	}

	@Column(name = "goods_deadTime")
	public Timestamp getDeadTime() {
		return deadTime;
	}

	public void setDeadTime(Timestamp deadTime) {
		this.deadTime = deadTime;
	}

	@Column(name = "goods_remark")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "goods_isForcedOpen")
	public String getIsForcedOpen() {
		return isForcedOpen;
	}

	public void setIsForcedOpen(String isForcedOpen) {
		this.isForcedOpen = isForcedOpen;
	}

}
